<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>签到系统 - 登录</title>
<link rel="stylesheet" href="css/style.default.css" type="text/css" />
<script type="text/javascript" src="js/plugins/jquery-1.7.min.js"></script>
<script type="text/javascript" src="js/plugins/jquery-ui-1.8.16.custom.min.js"></script>
<script type="text/javascript" src="js/plugins/jquery.cookie.js"></script>
<script type="text/javascript" src="js/plugins/jquery.uniform.min.js"></script>
<script type="text/javascript" src="js/custom/general.js"></script>
<script type="text/javascript" src="js/custom/index.js"></script>

<script type="text/javascript" src="js/baseServerLink.js"></script>
<style type="text/css">
	*{
		margin: 0 auto;
	}
</style>
<script>
	jQuery(function(){
		var date = new Date();
		jQuery("#my_login_button").click(function(){
			jQuery.ajax({
				url: 'CiuserServlet',
				data:{
					'mode':'41',
					'sid':jQuery("#username").val(),
					'password':jQuery('#password').val(),
					'd':date.getTime()
				},
				success:function(message){
					eval("message="+message);
					if(message['state'] == 'success'){
						alert("登陆成功");
						if(message['type'] == '1'){
							window.location.href="checkin/page_my_info.html";
							
						}
						else if(message['type'] == '2'){
							window.location.href="checkin/cilabadmin_welcome.html";
						}
						else{
							//已确认此处恢复正常的修改
							window.location.href="checkin/page_user_my_info.jsp";
						}
					}else if(message['state'] == 'refused'){
						alert('你的账户名和密码正确，但账户被禁用了。');
					}
					else{
						alert("用户名或密码错误");
					}
				},
				error:function(message){
					alert('服务器请求错误');
				}
			});
		});
		jQuery("#my_reg_button").click(function(){
			window.location.href='checkin/ciregister_new_user.html';
		})
		
		
	})
	
	
	
	
	
</script>
</head>

<body class="loginpage">
	<div class="loginbox">
    	<div class="loginboxinner">
        	
            <div class="logo">
				<h1 class="logo">签到<span>系统 </span><br/>Check-in<span>System</span> </h1>
				<!-- <span class="slogan" style="color: white;">签到系统<br/>check-in system</span> --> 
            </div><!--logo-->
           <br/>
			<div style="text-align: center;">
				<!-- <img  src="page_img/cilogont.png" />  老图片-->
				<img  src="page_img/School-of-computer-science--Heze-University.png" style="height: 120px; width: 120px;"/>  <!-- 新图片 -->
			</div>
			
			<br />
			<div style="text-align: center;">
				<p style="color: white;" id="my_message">请登录</p>
			</div>
			
            <form >
            	
                <div class="username">
                	<div class="usernameinner">
                    	<input type="text" name="username" id="username" />
                    </div>
                </div>
                
                <div class="password">
                	<div class="passwordinner">
                    	<input type="password" name="password" id="password" />
                    </div>
                </div>
                
                <button type="button" id="my_login_button">登录 - 签到系统</button>
				<br/>
				<br/>
				<button type="button" id="my_reg_button" style="background-color: green;">注册 - 签到系统</button>
                
				<!-- 
                <div class="keep"><input type="checkbox" /> 记住密码</div> -->
				<br/>
				<br/>
				<div style="text-align: center;">
					<u> <a href="index.jsp" style="color: white;text-align: center;">
					-</a></u>
				</div>
				
            </form>
            
        </div><!--loginboxinner-->
    </div><!--loginbox-->


</body>
</html>
